package com.xidian.zhiancloud.ticketTemplate.ticketContentRisk;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;

public class GroundBreakingJson extends TemplateJson{
    public static JsonNode GroundBreaking(){
        ObjectMapper mapper = new ObjectMapper();
        // 添加键值对。key是条目的名称，value也是HashMap类型的键值对
        HashMap<String, Object> t1 = new LinkedHashMap<>();

        List<HashMap<String, Object>> t2 = new LinkedList<>();
        HashMap<String,Object> m1 = new LinkedHashMap<>();
        m1.put("作业人员作业前已进行了安全教育",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m2 = new LinkedHashMap<>();
        m2.put("作业地点处于易燃易爆场所，需要动火时已办理了动火证",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m3 = new LinkedHashMap<>();
        m3.put("地下电力电缆已确认保护措施已落实",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m4 = new LinkedHashMap<>();
        m4.put("地下通讯电（光）缆，局域网络电（光）缆已确认保护措施已落实",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m5 = new LinkedHashMap<>();
        m5.put("地下供排水、消防管线、工艺管线已确认保护措施已落实",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m6 = new LinkedHashMap<>();
        m6.put("已按作业方案图规划线和立桩",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m7 = new LinkedHashMap<>();
        m7.put("动土地点有电线、管道等地下设施，已向作业单位交待并派人监护；作业时轻挖，未使用铁棒、铁镐或抓斗等机械工具",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m8 = new LinkedHashMap<>();
        m8.put("动土范围内无障碍物，并已在总图上做标记",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m9 = new LinkedHashMap<>();
        m9.put("人员出入口和撤离安全措施已落实：A.梯子；B.修坡道",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m10 = new LinkedHashMap<>();
        m10.put("道路施工作业已报：交通、消防、安全监督部门、应急中心",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m11 = new LinkedHashMap<>();
        m11.put("备有可燃气体检测仪、有毒介质检测仪",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m12 = new LinkedHashMap<>();
        m12.put("现场夜间有充足照明：A.36V、24V、12V防水型灯；B.36V、24V、12V防爆型灯",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m13 = new LinkedHashMap<>();
        m13.put("作业人员已佩戴防护器具",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m14 = new LinkedHashMap<>();
        m14.put("作业现场围栏、警戒线、警告牌夜间警示灯已按要求设置",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m15 = new LinkedHashMap<>();
        m15.put("已进行放坡处理和固壁支撑",getFiled("确认人","String",0,new String[]{}));
        HashMap<String,Object> m16 = new LinkedHashMap<>();
        m16.put("其他安全措施：",getFiled("确认人","String",0,new String[]{}));

        t2.add(m1);
        t2.add(m2);
        t2.add(m3);
        t2.add(m4);
        t2.add(m5);
        t2.add(m6);
        t2.add(m7);
        t2.add(m8);
        t2.add(m9);
        t2.add(m10);
        t2.add(m11);
        t2.add(m12);
        t2.add(m13);
        t2.add(m14);
        t2.add(m15);
        t2.add(m16);

        t1.put("safe_measure",getFiled("安全措施","string",0, t2));
        JsonNode jsonNode = mapper.valueToTree(t1);
        System.out.println(jsonNode);
        return jsonNode;
    }
}
